package com.example.springboot.mapper;

import com.example.springboot.entity.Course_select_del;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface Course_select_delMapper {
    @Select("SELECT * FROM course_select_del")
    List<Course_select_del> findAll();
    @Select("SELECT * FROM course_select_del where  student_id = #{id}")
    List<Course_select_del> findDel(Integer id);
    @Insert("insert into course_select_del (course_id , student_id , select_time) values (#{course_id},#{student_id},#{select_time})")
    int insertDelCourse(Course_select_del course_select_del);
    @Delete("delete from course_select  where course_id =#{course_id} and student_id =#{student_id} ")
    int DelCourseSelect(Integer course_id, Integer student_id);
}
